<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>rsa demo</title>
</head>
<body>
内容在控制台

<!--<script src="https://cdn.staticfile.org/cryptico/0.0.1343522940/cryptico.min.js"></script>-->
<script src="https://cdn.staticfile.org/jsencrypt/3.0.0-rc.1/jsencrypt.min.js"></script>
<script>

    const PublicKeyString = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdFesb/CC6KLDra6rbrmlKBKhDjnJog6XkYTGrmZlAQxzos4QPkqG5fnjWboY37rGEDnHG09lLTA94CWdCAxxKH9EBA5wB5cU1DN8LOEwG6PT1hgNK54FD7Kz7Lb2l+Xbut67DW0hXar/nXl9Tt9mraIbfEsdZ+idct83bmPhZzwIDAQAB";
    const text = "Ma达瓦里打了瓦！@##tt, I need you to help me with my Starcraft strategy.";

    // const result = cryptico.encrypt(text, PublicKeyString);
    // console.log(result.cipher);
    // console.log(result.cipher.replace(/\+/g, '%2B'));


    let encrypt = new JSEncrypt();
    encrypt.setPublicKey(PublicKeyString);
    console.log(encrypt.encrypt(text));

</script>
</body>
</html>
